home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!sschaem
- From: sschaem@teleport.com (Stephan Schaem)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Amiga programmers in deep shit...
- Date: 10 Jan 1996 16:58:29 GMT
- Organization: Teleport - Portland's Public Access (503) 220-1016
- Distribution: world
- Message-ID: <4d0r7l$i4i@maureen.teleport.com>
- References: <john.hendrikx.44q7@grafix.xs4all.nl>
- NNTP-Posting-Host: julie.teleport.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- John Hendrikx (john.hendrikx@grafix.xs4all.nl) wrote:
- : Okay, just for you I wrote a test-program to prove it is possible. Right now a
- : test-program is running which reads 512 bytes from my IDE drive every VBlank.
- : According to Spy the TOTAL CPU time used by my system right now is between 11
- : and 14% (I've got a 68030/22). This time is distributed among the following
- : tasks like this:
-
- Thanks :)
-
- : SoftSCSI_ATEA.device 2.8%
- : DH1 2.6%
- : DoLotsOfSmallReads 1.5%
- : DisplaySpy 1.2% (the program displaying a CPU-time graph)
- : input.device 1.1%
- : TopCPU 0.5% (the program which displayed these values)
- : BOOT:C/SMouse 0.3% (my wb-titlebar clock program)
-
- : Only the first 3 are the ones involved with reading the data from the HD (the
- : SCSI-device, the filesystem and the program performing the reads).
-
- : The DoLotsOfSmallReads program consists of nothing more than this:
-
- : do {
- : WaitTOF();
- : Read(fh,&buffer,512);
- : } while(result==512)
-
- : (I wrote it in ASM so the code above may not be correct :-) I used ASM because
- : I had to do several tests, and I don't want to wait 2 minutes for every
- : re-compile :-))
-
- Get the system time in tick before the read() and after:
-
- Because its possible that the ~14% happen once every 60 frame. 14% of 60*262
- = 2200 scanline...
-
- : SS> If one can read 512byte continously in ~25 raster using read() on a
- : SS> non dma controler , I would say yes too. triple bufffer could 'smooth'
- : SS> the possible sporatic behaviour of the read()/device/HW.
-
- : Well, see above :-)
-
- From your test result I see it take 14% of the system time not 14% of a
- frame wich is very diferent for what you want to do.
-
- : As you can see above it ain't really necessary, if you can spare a bit of CPU
- : time. Even with 1K or 2K block reads every frame you still beat floppies by a
- : long way, and without any noticeable slow-downs.
-
- It will work if you are garantied 80% of the frame for 'rendering'.
-
- I guess I can try too... create a 10meg file, and do 1k read every frame
- and monitor each read() cpu usage... But then I have A3000 with a fast
- scsi drive, not top of the line for that test but defenetly above an A2000
- with a dataflyer and old IDE drive.
-
- Stephan
-